package controller

import "fmt"

// DemoArray2 /** golang数组
func DemoArray2() {
	a := [3]int{1, 2, 3}
	c := [...]int{3, 4, 5, 6}
	_, err := fmt.Printf("%v\n", a)
	fmt.Printf("%v\n", c)
	if err != nil {
		return
	}
	doubleArray := [3][4]int{
		{1, 2, 3, 4},
		{5, 6, 7, 8},
	}
	easyArray := [2][4]int{{1, 2, 3, 4}, {5, 6, 7, 8}}
	fmt.Printf("doubleArray is %v\n", doubleArray)
	fmt.Printf("easyArray is %v\n", easyArray)
}

func DemoSlice() {
	//var fslice []int
	slice := []byte{'a', 'b', 'c', 'd'}
	fmt.Printf("slice is %v\n", slice)
}
